package com.rjyb.feedbackplatform.controller;

import com.rjyb.feedbackplatform.bean.Feedback;
import com.rjyb.feedbackplatform.service.UserService;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;

import javax.annotation.Resource;

@Controller
@RequestMapping("/user")
public class UserController {
    @Resource
    private UserService userService;

//去投诉
    @RequestMapping("/toadd")
    public String toadd() {
        return "toushu";
    }
//投诉
    @RequestMapping("/add")
    public String add(Feedback feedback) {
        userService.add(feedback);
        return "index";
    }

}
